package mapper;

import org.apache.ibatis.annotations.*;
import pojo.wenxian;
import pojo.wenxian1;
import servlet.du;

import java.sql.Date;
import java.util.List;

public interface wenMapper {
    List<wenxian1> cha(wenxian1 wenxian1);
    @Insert("insert into wenxian values (#{wen},#{di},#{zuo},#{guan},#{rq},#{lei})")
    void into(wenxian1 wenxian1);

    List<wenxian1> selectByPageAndCondition(@Param("begin")int begin, @Param("size")int size, @Param("wenxian1")wenxian1 wenxian1);
    int selectTotalCountByCondition(wenxian1 wenxian1);
    @Delete("delete from wenxian where di=#{di}")
    void shan(String di);
    @Update("update wenxian set zuo =#{zuo},guan =#{guan}, rq =#{rq},lei =#{lei} where di =#{di}")
    void xiu(wenxian1 wenxian1);
    List<wenxian1> shijian(@Param("begin")int begin, @Param("size")int size,@Param("kai")Date kai,@Param("jie") Date jie);
    int shis(@Param("kai")Date kai,@Param("jie") Date jie);
}
